<?php
namespace backend\models;

use Yii;
use yii\base\NotSupportedException;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;

/**
 * Clue model
 *显示字段

 */
class CoordinationDegree extends ActiveRecord
{
    const STATUS_DELETED = 0;
    const STATUS_ACTIVE = 10;


    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%coordination_degree}}';
    }

    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        return [
            'timestamp' => [
                'class' => 'yii\behaviors\TimestampBehavior',
                'attributes' => [
                    ActiveRecord::EVENT_BEFORE_INSERT => [


                    ],
                    ActiveRecord::EVENT_BEFORE_UPDATE => [

                    ]
                ]
            ]
        ];
    }

    /**
     * @inheritdoc
     */
   /* public function rules()
    {
        return [
            ['status', 'default', 'value' => self::STATUS_ACTIVE],
            ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]],
        ];
    }
   */


    public static function findByUsername($username)
    {
        return static::findOne(['userName' => $username]);
    }
    /**
     * 获取配合程度列表
     */
    public static function getCoordinationDegreeList(){
        $rolesList=static::find()->asArray()->all();
        return $rolesList;
    }
    /**
     * 添加配合程度
     */
    public static function addCoordinationDegree(){

    }
}
